package com.weixinli.beans;

import java.io.Serializable;

public class Room implements Serializable{
	private int rid;//房间编号
	private String rname;//房间名称
	private int rnumber;//房间上限
	private String rtype;//房间类型
	private static final long serialVersionUID = 1L;
	@Override
	public String toString() {
		return "Room [rid=" + rid + ", rname=" + rname + ", rnumber=" + rnumber
				+ ", rtype=" + rtype + "]";
	}

	public int getRid() {
		return rid;
	}

	public void setRid(int rid) {
		this.rid = rid;
	}

	public String getRname() {
		return rname;
	}

	public void setRname(String rname) {
		this.rname = rname;
	}

	public int getRnumber() {
		return rnumber;
	}

	public void setRnumber(int rnumber) {
		this.rnumber = rnumber;
	}

	public String getRtype() {
		return rtype;
	}

	public void setRtype(String rtype) {
		this.rtype = rtype;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + rid;
		result = prime * result + ((rname == null) ? 0 : rname.hashCode());
		result = prime * result + rnumber;
		result = prime * result + ((rtype == null) ? 0 : rtype.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Room other = (Room) obj;
		if (rid != other.rid)
			return false;
		if (rname == null) {
			if (other.rname != null)
				return false;
		} else if (!rname.equals(other.rname))
			return false;
		if (rnumber != other.rnumber)
			return false;
		if (rtype == null) {
			if (other.rtype != null)
				return false;
		} else if (!rtype.equals(other.rtype))
			return false;
		return true;
	}

	public Room(int rid, String rname, int rnumber, String rtype) {
		super();
		this.rid = rid;
		this.rname = rname;
		this.rnumber = rnumber;
		this.rtype = rtype;
	}

	public Room() {
		super();
	}
}
